<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
</head>
<style>
.form-horizontal {
    width: 750px;
    padding-top: 40px;
    margin: 0 auto;
}
.btn-default {
    color: #444;
    background-color: #fafafa;
    border-color: #ddd;
    width: 75px;
}
</style>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <a class="btn btn-primary" @click="reload">查询</a>
            <#if shiro.hasPermission("feedBack:tQuestionBankError:approval")>
                <a class="btn btn-primary" @click="approval"><i class="fa fa-pencil-square-o"></i>&nbsp;审核</a>
            </#if>
            <div class="form-group col-sm-2" >
                <select v-model="q.approvalState" class="form-control" @change="reload">
                    <option v-for="item in approvalStateList" v-bind:value="item.code">{{item.msg}}</option>
                </select>
            </div>
        </div>

        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form id="paperProduceform" class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">专业名称</div>
                <div class="col-sm-10">
                    <select v-model="question.majorId" class="form-control" placeholder="专业名称" v-bind:readonly="onlyShow" v-bind:disabled="onlyShow">
                        <option v-for="item in majorList" v-bind:value="item.id">{{item.majorName}}</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">章节名称</div>
                <div class="col-sm-10">
                    <select v-model="question.sectionId" class="form-control" placeholder="章节名称" v-bind:readonly="onlyShow" v-bind:disabled="onlyShow">
                        <option v-for="item in sectionList" v-bind:value="item.id">{{item.sectionName}}</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">试题等级</div>
                <div class="col-sm-10">
                    <select v-model="question.grade" class="form-control" placeholder="试题等级" v-bind:readonly="onlyShow" v-bind:disabled="onlyShow">
                        <option v-for="item in gradeList" v-bind:value="item.code">{{item.message}}</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">试题类别</div>
                <div class="col-sm-10">
                    <select v-model="question.typeId" class="form-control" placeholder="试题类别" v-bind:readonly="onlyShow" v-bind:disabled="onlyShow">
                        <option v-for="item in typeList" v-bind:value="item.questionTypeNumber">{{item.questionTypeName}}</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">试题内容</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="question.content" name="name" placeholder="试题内容"  v-bind:readonly="onlyShow"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">选项</div>
            </div>
            <div class="form-group" v-for="item in optionList">
                <!--<div class="input-group-addon">{{ item.flag }}</div>-->
                <div class="col-sm-2 control-label" v-if="question.answerId.indexOf(item.flag)>-1"><span style="color:#880000">答案：</span>{{ item.flag }}</div>
                <div class="col-sm-2 control-label" v-else>{{ item.flag }}</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="item.content" v-bind:readonly="onlyShow">
                </div>
            </div>

            <!--<div class="form-group">
				<div class="col-sm-2 control-label">试卷数量</div>
				<div class="col-sm-10">
                    <input type="text" class="form-control" v-model="paperDesign.produceQuantity" name="produceQuantity" placeholder="试卷数量"/>
				</div>
			</div>
			<div class="form-group">
                <div class="col-sm-2 control-label">题目总数</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="paperDesign.questionQuantity" name="questionQuantity" placeholder="题目总数" readonly="readonly"/>
                </div>
            </div>
			<div class="form-group">
                <div class="col-sm-2 control-label">试卷总分</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="paperDesign.totalScore" name="totalScore" placeholder="试卷总分" readonly="readonly"/>
                </div>
            </div>-->
            <div style="height: 50px;"></div>
            <div class="form-group col-md-12">
                        <div class="col-sm-2 control-label"></div>
                        <input type="button" class="btn btn-primary" v-if="questionError.approvalState == 0" @click="passApproval" value="反馈通过，试题有误" /> &nbsp;&nbsp;
                        <input type="button" class="btn btn-primary" v-if="questionError.approvalState == 0" @click="rejectApproval" value="反馈拒绝" /> &nbsp;&nbsp;
                        <input type="button" class="btn btn-warning" @click="reload" value="返回" />
            </div>
        </form>
    </div>
</div>

<div id="produceListLayer" style="display: none;padding:10px;">
	<ul id="deptTree" class="ztree"></ul>
</div>

<div id="paperList" style="display: none;padding:10px;">
    <table id="paperJqGrid"></table>
    <div id="paperJqGridPager"></div>
</div>

<div id="paperInfo" style="display: none;padding:10px;">
</div>

<script src="${request.contextPath}/statics/js/modules/feedBack/questionBankError.js?_${.now?long}"></script>
</body>
</html>